<?php


$uri 	= $_SERVER['REQUEST_URI'];
$dir	= dirname($uri);


$listAction 	= 	'"'."$dir".'/tableData.php"';
$createAction 	=	'"'."$dir".'/tableData.php"';
$updateAction	=	'"/GettingStarted/CreatePerson"';
$deleteAction	=	'"/GettingStarted/CreatePerson"';



?>

<html>
<head>

	<!-- CSS resources -->
	<link rel="stylesheet" type="text/css" href="themes/standard/blue/jtable_blue.css"   />
	<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/redmond/jquery-ui.css"   /> 
	<link rel="stylesheet" type="text/css" href="myStyle.css"   />
	
	<!-- JQUERY -->
	<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
	
	<!-- JQUERYUI -->
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
	
	<!-- jTable script file. -->
	<script type="text/javascript" src="jquery.jtable.min.js"></script> 

	<title>jTable tutorial</title>
</head>

<body>

	<div id="PersonTableContainer">
	</div>

	<script type="text/javascript">
    $(document).ready(function () {
        $('#PersonTableContainer').jtable({

            // Field Options
            title: 					'sample jtable',
            paging:					false,
            //pageSize				10,
			sorting:				false,
			//defaultSorting		'Name ASC',
			selectOnRowClick:		false,
            selectingCheckboxes:    false,
     		selecting:				false,
			multiselect: 			false,
		    deleteConfirmation:		true,
			 /**
             *  blind, bounce, clip, drop, explode, fold,
             *  highlight, puff, pulsate, scale, shake, size, slide
             */
            dialogShowEffect: 		'fade', 
            dialogHideEffect:		'blind',

            // Actions	
            actions: {
                listAction: 	<?php echo $listAction;?>,
                createAction: 	<?php echo $createAction;?>,
                updateAction: 	<?php echo $updateAction;?>,
                deleteAction: 	<?php echo $deleteAction;?>
            },

            // Fields
            fields: {
                id: {
                    key: 			true,
                    create: 		false,
                    edit: 			false,
                    list: 			false
                },
                IsActive: {
					title:			'status',
					width:			'12%',
					type:			'checkbox',
					values:			{0:'false',1:'true'},
					defaultValue: 	'1'
                },
                Gender: {
                    title: 			'Gender',
                    width: 			'11%',
                    options: 		{'M':'Male','F': 'Female'}
                },
                Name: {
                    title: 			'Author Name',
                    width: 			'40%'
                },
                Age: {
                    title: 			'Age',
                    width: 			'20%'
                },
                RecordDate: {
                    title: 			'Record date',
                    width: 			'30%',
                    type: 			'date',
                    create: 		true,
                    edit: 			true
                },
                Education: {
                    title: 			'Choose',
                    list: 			true,
                    type: 			'radiobutton',
                    options: 		{'1': 'first', '2': 'secound', '3': 'thirth' },
                    inputClass: 	'validate[required]'                    
                },
                About: {
					title:			'about',
					type:			'textarea',
					list:			false
                }
            }
        });

        $('#PersonTableContainer').jtable('load');
    });
</script>



</body>

</html>





